package com.example.cshaoshao.demo.activities;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import android.widget.Toast;

import com.example.cshaoshao.demo.R;
import com.example.cshaoshao.demo.entities.CallParm;
import com.example.cshaoshao.demo.entities.Info;

import java.util.List;

/**
 * Created by cshaoshao on 2017/6/26.
 */

public class TestActivity extends AppCompatActivity implements CallParm
{
    private TextView textView;
    private Info info;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        textView= (TextView) findViewById(R.id.textview4);
        info=new Info(this);
        info.getData();
    }

    @Override
    public void successful(List<String> list)
    {
        textView.setText(list+"");

    }

    @Override
    public void failed(String e)
    {
        Toast.makeText(TestActivity.this,e,Toast.LENGTH_SHORT).show();
    }

}
